function onVehVelocityChange(playerid, vehID, vehVelocity)
{
    setVehicleVelocity(vehID, vehVelocity[0], vehVelocity[1], vehVelocity[2]);
    return 1;
}
addEvent("vehVelocityChange", onVehVelocityChange);

function onVehicleToggleLights(playerid)
{
	if(isPlayerInAnyVehicle(playerid) && getPlayerSeatId(playerid) == 0)
	{
		local vehicleid = getPlayerVehicleId(playerid);
		if(vehData[vehicleid].lights)
		{
			setVehicleLights(vehicleid, false);
			vehData[vehicleid].lights = 0;
		}
		else
		{
			setVehicleLights(vehicleid, true);
			vehData[vehicleid].lights = 1;
		}
	}
}
addEvent("vehicleToggleLights", onVehicleToggleLights);